package com.ruoyi.common.core.domain.entity;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

/**
 * 产品类型对象 t_b_product_type
 * 
 * @author pspyy
 * @date 2022-02-25
 */
public class TBProductType extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 产品名称 */
    @Excel(name = "产品名称")
    private String productName;

    /** 父级产品id;一级分类为0 */
    private Long parentProductId;

    @Excel(name = "父级产品")
    private String parentProductName;

    /** 祖级列表 */
    private String ancestors;

    /** 产品编码 */
    @Excel(name = "产品编码")
    private String productCode;

    /** 图片地址 */
    private String imagePath;

    /** 附件id */
    private String attachmentId;

    /** 排序 */
    @Excel(name = "排序",type = Excel.Type.IMPORT)
    private Long sort;

    private List<TBProductType> children = new ArrayList<TBProductType>();
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public String getAncestors() {
        return ancestors;
    }

    public void setAncestors(String ancestors) {
        this.ancestors = ancestors;
    }

    public void setProductName(String productName)
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }
    public void setParentProductId(Long parentProductId) 
    {
        this.parentProductId = parentProductId;
    }

    public Long getParentProductId() 
    {
        return parentProductId;
    }
    public void setProductCode(String productCode) 
    {
        this.productCode = productCode;
    }

    public String getProductCode() 
    {
        return productCode;
    }
    public void setImagePath(String imagePath) 
    {
        this.imagePath = imagePath;
    }

    public String getImagePath() 
    {
        return imagePath;
    }
    public void setAttachmentId(String attachmentId)
    {
        this.attachmentId = attachmentId;
    }

    public String getAttachmentId()
    {
        return attachmentId;
    }
    public void setSort(Long sort) 
    {
        this.sort = sort;
    }

    public Long getSort() 
    {
        return sort;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("productName", getProductName())
            .append("parentProductId", getParentProductId())
            .append("productCode", getProductCode())
            .append("imagePath", getImagePath())
            .append("attachmentId", getAttachmentId())
            .append("sort", getSort())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
    public List<TBProductType> getChildren() {
        return children;
    }

    public void setChildren(List<TBProductType> children) {
        this.children = children;
    }

    public String getParentProductName() {
        return parentProductName;
    }

    public void setParentProductName(String parentProductName) {
        this.parentProductName = parentProductName;
    }
}
